'use strict';
/*
 * 系统设置-组织机构管理
 * @type {*}
 */
let underscore = require('underscore');
let RestifyProxy = require('../../util/RestifyProxy');
let StringUtil = require('../../util/StringUtil');
let Constant = require('../../model/Constant');
let baseService = require('../BaseService');
const URI = {
    PARA: '/users',//-组织机构管理——列表
    SAVE: '/users',
    ADD: '/users/{0}/info',
    MODIFY: '/users/{0}',
    MODIFYDATA: '/users/{0}',
    DELETE: '/users/{0}',
    TREE: '/storage/getStorageTreeList',//功能右侧树菜单,
    DISABLED_USER: '/users/{0}/disable'
};

/**
 * 系统设置--组织机构管理——列表
 * @param thiz
 * @returns {Promise}
 */
module.exports.organizeList = function (thiz, params) {
    return baseService.get(thiz, URI.PARA, params);
};
/*-组织机构管理——新增页面-保存按钮*/
module.exports.organizeAdd = function (thiz, params) {
    return baseService.put(thiz, StringUtil.format(URI.ADD, params));
};

/*-组织机构管理——修改页面-数据*/
module.exports.organizeModifydata = function (thiz, params) {
    return baseService.put(thiz, StringUtil.format(URI.MODIFY, params));
};
/*-组织机构管理——修改页面-保存按钮*/
module.exports.organizeModify = function (thiz, params) {
    return baseService.put(thiz, StringUtil.format(URI.MODIFYDATA, params));
};
/*-组织机构管理——删除按钮*/
module.exports.organizeDelete = function (thiz, params) {
    return baseService.put(thiz, StringUtil.format(URI.DELETE, params));
};
/*-组织机构管理——tree数据*/
module.exports.organizeTree = function (thiz, params) {
    return baseService.get(thiz, StringUtil.format(URI.TREE, params));
};




